/*kU2KplAnFs/qPdYvdu53wmPY0qYnzfMWHGLY9HoSQoLF0WO8NSl8DIPFFII8e8wd*/
/*
 * @Author: xiahui 
 * @PageInfo: 输出
 * @Date: 2019-02-13 17:32:11 
 * @Last Modified by: xiahui
 * @Last Modified time: 2019-07-10 15:53:15
 */
import { output } from 'nc-lightapp-front';
import { AREA, URL, FIELDS } from '../../constance';
import { showWarningInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';

export default function(props) {
	let checkArr = props.table.getCheckedRows(AREA.listTableId);
	if (!checkArr || checkArr.length < 1) {
		showWarningInfo(null, getLangByResId(this, '4004PURDAILY-000058')); /* 国际化处理： 请选择数据*/
		return;
	}

	let oids = [];
	checkArr.map((row) => {
		oids.push(row.data.values[FIELDS.pk_ct_pu].value);
	});

	output({
		url: URL.print,
		data: {
			oids: oids,
			outputType: 'output'
		}
	});
}

/*kU2KplAnFs/qPdYvdu53wmPY0qYnzfMWHGLY9HoSQoLF0WO8NSl8DIPFFII8e8wd*/